package com.example.blackbox.Activity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.TextUtils;

import androidx.annotation.Nullable;

public class StartActivity extends Activity {
    SharedPreferences sp;
    String flag;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        sp=getSharedPreferences("flag", Context.MODE_PRIVATE);
        flag=sp.getString("flag",null);
        if (TextUtils.isEmpty(flag)){
            startActivity(new Intent(StartActivity.this,GuideActivity.class));
            sp.edit().putString("flag","1").commit();
            finish();
        }else{
            startActivity(new Intent(StartActivity.this,LoginActivity.class));
            finish();
        }
    }
}
